Parameters | location (real) (real) (real) (real) |
---|---|
Support | |
Mean | [1] |
Variance | [1] |
In probability theory and statistics, the normal-gamma distribution is a bivariate four-parameter family of continuous probability distributions. It is the conjugate prior of a normal distribution with unknown mean and precision.[2]
Contents |
Suppose
has a normal distribution with mean and variance , where
has a gamma distribution. Then has a normal-gamma distribution, denoted as
For any t > 0, tX is distributed
By construction, the marginal distribution over is a gamma distribution, and the conditional distribution over given is a Gaussian distribution. The marginal distribution over is a three-parameter Student's t-distribution.
Form of the posterior for a Normal random variable with a Normal-Gamma prior:
Presume the following hierarchy for a normal random variable X with unknown mean and precision .
Where:
Note the joint distribution of the parameters is Normal-Gamma. The posterior distribution of the parameters can be analytically determined by Bayes' rule working with the likelihood , and the prior .
where , the sum of squared errors.
Now consider the prior,
The posterior distribution of the parameters is proportional to the prior times the likelihood.
Notice the right half begins to look like the kernel of a normal pdf and the left like a gamma. After a bit of juggling and completing the square the result will appear.
This is a normal gamma pdf with parameters
The reference prior is the limiting case as
and
Generation of random variates is straightforward: